﻿namespace blacksoft.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;

    public class ART_Proveedor
    {
        public ART_Proveedor()
        {
            this.OrdenCompra = new HashSet<OrdenCompra>();
            this.Producto_x_Proveedor = new HashSet<Producto_x_Proveedor>();
        }
        public int IDPersona { get; set; }

        [Display(Name = "R.U.C."), StringLength(11, MinimumLength = 11)]
        public string RUC { get; set; }

        [Required]
        [Display(Name = "Razón Social")]
        public string RazonSocial { get; set; }

        [Display(Name = "Dirección")]
        [StringLength(150)]
        public string Direccion { get; set; }

        [Display(Name = "Teléfono")]
        [RegularExpression(@"^[0-9]{6,7}", ErrorMessage = "El teléfono debe constar de 7 dígitos.")]
        public Nullable<int> Telefono { get; set; }

        [Display(Name = "Estado")]
        [Required]
        public string Estado { get; set; }

        [Display(Name = "E-mail")]
        [DataType(DataType.EmailAddress)]
        public string Email { get; set; }

        public virtual ICollection<OrdenCompra> OrdenCompra { get; set; }

        public virtual ICollection<Producto_x_Proveedor> Producto_x_Proveedor { get; set; }
    }
}